﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <title>会员注册_红岭创投</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="/scripts/legacy/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/scripts/legacy/com.js?t=201412"></script>
    <script type="text/javascript" src="/scripts/legacy/placeholder.js"></script>
    <link href="~/pc/themes/base.css" rel="stylesheet" />
    <link href="~/pc/themes/ceng.css" rel="stylesheet" />
    <link href="~/pc/themes/Safe.css" rel="stylesheet" />
    <script language="javascript" type="text/javascript">
        var tongdunRequestID;
        (function() {
            tongdunRequestID='my089-17022019-3714-5319-2945-944242818144';
            _fmOpt =
                {
                partner: 'my089',
                appName: 'my089_web',
                token: tongdunRequestID
                };
            var cimg = new Image(1,1);
            cimg.onload = function() {
                _fmOpt.imgLoaded = true;
            };
            cimg.src = "https://fp.fraudmetrix.cn/fp/clear.png?partnerCode=my089&appName=my089_web&tokenId=" + _fmOpt.token;
            var fm = document.createElement('script'); fm.type = 'text/javascript'; fm.async = true;
            fm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.fraudmetrix.cn/fm.js?ver=0.1&t=' + (new Date().getTime()/3600000).toFixed(0);
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fm, s);
        })();
        function setTongdunRequestID(){
            document.getElementById("requestId").value=tongdunRequestID;
        }

    </script>
</head>
<body>
    <div class="Small_head">
        <div class="Small_head_cont">
            <p class="link rt"></p>
            <div class="clear">
            </div>
        </div>
    </div>
    <div class="content" id="hongman" style="min-height: 300px;">
        <style type="text/css">
            body {
                background: #f1f1f1;
            }

            .txt_180 {
                width: 200px;
                border: solid 1px #dcdcdc;
                height: 35px;
                line-height: 35px;
                font-size: 14px;
            }

            .txt_80 {
                width: 110px;
                border: solid 1px #dcdcdc;
                height: 32px;
                line-height: 32px;
                font-size: 14px;
            }

            .but_jb {
                margin-left: 5px;
            }

            input:-moz-placeholder, input:-ms-input-placeholder, input::-moz-placeholder {
                color: #999;
            }

            .content {
                background: #fff;
                width: 100%;
                margin: 0;
                padding: 70px 0;
            }

            .Register {
                margin: 0;
            }

                .Register .Reg_lf h6 {
                    font-size: 22px;
                    font-weight: normal;
                    color: #038adc;
                    text-align: center;
                }
                /*.Register .Reg_rt{background:url(/resources/bule_img/Regstep.png) no-repeat 2px top;}*/
                .Register .Reg_rt {
                    background: url(../_files/Register.png) no-repeat 2px top;
                }

                    .Register .Reg_rt h5 {
                        height: 40px;
                        line-height: 40px;
                        font-size: 16px;
                        font-weight: normal;
                        text-align: center;
                        margin-top: 15px;
                    }

            .QQInfo {
                background: #f5f5f5;
                padding: 7px 10px;
                margin: 0 0 10px 0;
                border: solid 1px #eaeaea;
            }

                .QQInfo img {
                    vertical-align: middle;
                }

                .QQInfo p {
                    margin: 0 0 3px 15px;
                }

                    .QQInfo p span.QQUsername {
                        color: #0082d6;
                    }

            div.foot_1 {
                margin-top: 0px;
            }
        </style>
            <input type="hidden" id="formFrom" name="formFrom" value="0" />
            <div style="width: 1000px; margin: 0 auto;">
                <div class="Register">
                    <div class="Reg_lf lf">
                        <h1 style=" font-size:36px; text-align:center;">诚信金融用户</h1>
                        <h1 style=" font-size:36px; text-align:center;">注册</h1>
                            <table style="margin-left:150px;">
                                <tr>
                                    <td colspan="3" style="height:14px;"><span id="info"></span></td>
                                </tr>
                                <tr>
                                    <td>用户名：</td>
                                    <td><input type="text" onblur="RegisterRepeat()" class="" placeholder="用户名注册后不能修改" id="name" /></td>
                                    <td><span id="NAME"></span></td>
                                </tr>
                                <tr>
                                    <td>密码：</td>
                                    <td><input type="password" placeholder="请输入6-18位的密码" id="pwd" /></td>
                                    <td><span id="PWD"></span></td>
                                </tr>
                                <tr>
                                    <td>确认密码：</td>
                                    <td><input type="password" placeholder="请再次输入密码" id="npwd" /></td>
                                    <td><span id="NPWD"></span></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><input type="button" onclick="Register()" style="width:60px;height:40px;" value="注册" /></td>
                                </tr>
                            </table>
                    </div>


                    <div class="Reg_rt rt ">
                    </div>
                    <div class="lf" style=" margin-left:400px;"><h4>已有账号→<a class="bule" href="/MyAccount/View_UserLogin">马上登录</a></h4></div>
                    <div class="clear"></div>
                </div>
            </div>
    </div>
</body>
</html>
<script>
    $(function () {
    })

    $(function () {
        $("#name").blur(function () {
            if ($("#name").val() == "") {
                $("#NAME").html("×请输入用户名");
                $("#NAME").css("color", "red");
            }
            else {
                $("#NAME").html("√");
                $("#NAME").css("color", "green");
                
            }
        })
        $("#pwd").blur(function () {
            if ($("#pwd").val() == "") {
                $("#PWD").html("×请输入密码");
                $("#PWD").css("color", "red");
            }
            else {
                $("#PWD").html("√");
                $("#PWD").css("color", "green");
            }
        })
        $("#npwd").blur(function () {
            if ($("#npwd").val() == "") {
                $("#NPWD").html("×请再次输入密码");
                $("#NPWD").css("color", "red");
            }
            else if($("#pwd").val() == $("#npwd").val())
            {
                $("#NPWD").html("√");
                $("#NPWD").css("color", "green");
            }
            else
            {
                $("#NPWD").html("×两次密码输入不一致 !");
                $("#NPWD").css("color", "red");
            }
        })
    })



    function Register() {
        if ($("#name").val() != "") {
            $.ajax({
                url: "/MyAccount/User_RegisterRepeat",
                type: "post",
                data: {
                    name: $("#name").val()
                },
                success: function (mes) {
                    if (mes == 1) {
                        $("#NAME").html("×该用户名已存在");
                        $("#NAME").css("color", "red");
                    }
                    else {
                        $("#NAME").html("√");
                        $("#NAME").css("color", "green");
                    }
                }
            })
        }
            if ($("#pwd").val() == "") {
                $("#PWD").html("×请输入密码");
                $("#PWD").css("color", "red");
            }
            else {
                $("#PWD").html("√");
                $("#PWD").css("color", "green");
                if ($("#npwd").val() == "") {
                    $("#NPWD").html("×请再次输入密码");
                    $("#NPWD").css("color", "red");
                }
                else if ($("#pwd").val() == $("#npwd").val()) {
                    $("#NPWD").html("√");
                    $("#NPWD").css("color", "green");
                    $.ajax({
                        url: "/MyAccount/View_RegisterDo",
                        type: "post",
                        data: {
                            name: $("#name").val(),
                            pwd: $("#pwd").val()
                        },
                        success: function (mes) {
                            if (mes == 1) {
                                alert("注册成功", location.href = "/MyAccount/View_UserLogin")
                            }
                            else {
                                alert("系统异常！请稍后再试！")
                            }
                        }
                    })
                }
                else {
                    $("#NPWD").html("×两次密码输入不一致!");
                    $("#NPWD").css("color", "red");
                }
            }
        }



    function RegisterRepeat() {
        if ($("#name").val() != "")
        {
            $.ajax({
                url: "/MyAccount/User_RegisterRepeat",
                type: "post",
                data: {
                    name: $("#name").val()
                },
                success: function (mes) {
                    if (mes == 1) {
                        $("#NAME").html("×该用户名已存在");
                        $("#NAME").css("color", "red");
                    }
                    else {
                        $("#NAME").html("√");
                        $("#NAME").css("color", "green");
                    }
                }
            })
        }
        else
        {
            $("#name").blur(function () {
                  if ($("#name").val() == "") {
                      $("#NAME").html("×请输入用户名");
                      $("#NAME").css("color", "red");
                  }
                  else {
                      $("#NAME").html("√");
                      $("#NAME").css("color", "green");
                  }
              })
        }
      
    }
</script>

